//---------------------------------------------------------------------------

#ifndef poligonoH
#define poligonoH
#include <Windows.h>
#include <gl/GL.h>
#include <gl/GLU.h>
#include "PV2D.h"
#include "Obstaculo.h"
#include "Lapiz.h"
#include <vector>

//---------------------------------------------------------------------------
class Poligono : public Obstaculo
{
private:
        vector<PV2D*>* contorno;
        vector<PV2D*>* normales;
        vector<PV2D*>* normalesDibu;

        //Color
	GLfloat r;
	GLfloat g;
	GLfloat b;

        calcularNormal();
        ~Poligono();

public:
	Poligono(vector<PV2D*>* cont,GLfloat cR, GLfloat cB, GLfloat cG);
        setColor(GLfloat rr, GLfloat gg, GLfloat bb);
        void draw(bool b);
        bool interseccionVSBall(Ball* b, float & tHit,PV2D*& normalLocal);
};


#endif
